clc;
clear all;
n = 20;
fac=1;
s=0;
r1 = 9;
r2 = 3;
fe =1;
c = 3;
pc = 4;
gc = 5;
feeder_num = 6;
fc1 = [4,3,5,7;1,2,4,3];
fc2 = [4,5,6,1,3,7,2];
pc1 = Life(fc1,fe,c,pc,gc,feeder_num);
pc2 = Life(fc2,fe,c,pc,gc,feeder_num);
FeCrossNum =4;
T = 20;
P= T;
t = 3;
FeCrossNum = round(log((T))+log((T))/2-t*log((T))/T)%每一代的群体数量计算
ACGA_f = open('RTC/RTC/ACGA_RTC第4次.fig');
h_line=get(gca,'Children');%get linehandles
MCGA_xdata=get(h_line,'Xdata');
ACGA_ydata=get(h_line,'Ydata');
set(ACGA_f,'Name','figure1');
close(ACGA_f)

MCGA_f = open('RTC/RTC/MCGA_RTC第3次.fig');
h_line=get(gca,'Children');%get linehandles
MCGA_xdata=get(h_line,'Xdata');
MCGA_ydata=get(h_line,'Ydata');
set(MCGA_f,'Name','figure1');
close(MCGA_f)

MDFA_f = open('RTC/RTC/MDFA_RTC第2次.fig');
h_line=get(gca,'Children');%get linehandles
MDFA_xdata=get(h_line,'Xdata');
MDFA_ydata=get(h_line,'Ydata');
set(MDFA_f,'Name','figure1');
close(MDFA_f)

figure
plot(ACGA_ydata,'color','g')
hold on; box on
plot(MCGA_ydata,'color','r')
plot(MDFA_ydata,'color','b')




 

 







